include config.mk

SRC = getimglinks_readmanga.c getimglinks_mintmanga.c \
		  main.c options.c stdio_utils.c utils.c
OBJ = ${SRC:.c=.o}

all: options nmanga

options:
	@echo "\nnmanga build options:"
	@echo "CFLAGS = ${CFLAGS}"
	@echo "CC = ${CC}\n"

.c.o:
	${CC} -c ${CFLAGS} $< 

${OBJ}: config.h config.mk 

config.h:
	cp config.def.h $@

nmanga: ${OBJ}
	${CC} -o $@ ${OBJ}
clean:
	rm -f nmanga ${OBJ}

.PHONY: all options clean
